package org.example.springboot137.entity;

import lombok.Data;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Component
@Data
public class ResponseEntity<T> implements Serializable {
    private int code=0;//状态
    private String msg="success";//消息
    private long count;//总行数
    private Map<String,Object> data=new HashMap<>();
    //private List<T> data;//数据集合
    public ResponseEntity addDate(String key,Object value){
        this.data.put(key,value);
        return this;
    }
}
